
package com.google.code.lebar.bean.response.animation;


import java.util.ArrayList;
import java.util.List;


public class FullAnimation implements Animation, Cloneable
{
    private List<BasicAnimation> onCreate;
    private List<BasicAnimation> onUpdate;
    private List<BasicAnimation> onDelete;
    private List<BasicAnimation> onFocus;
    private List<BasicAnimation> onClick;

    @Override
    public FullAnimation clone()
    {
        FullAnimation tClonedFullAnimation = new FullAnimation();
        tClonedFullAnimation.setOnCreate( cloneBasicAnimationList( getOnCreate() ) );
        tClonedFullAnimation.setOnUpdate( cloneBasicAnimationList( getOnUpdate() ) );
        tClonedFullAnimation.setOnDelete( cloneBasicAnimationList( getOnDelete() ) );
        tClonedFullAnimation.setOnFocus( cloneBasicAnimationList( getOnFocus() ) );
        tClonedFullAnimation.setOnClick( cloneBasicAnimationList( getOnClick() ) );
        
        return tClonedFullAnimation;

    }

    private List<BasicAnimation> cloneBasicAnimationList( List<BasicAnimation> pClonedList )
    {
        if ( pClonedList == null ) return null;
        
        List<BasicAnimation> tClonedAnimations = new ArrayList<BasicAnimation>();        
        for ( BasicAnimation tAnimation : pClonedList )
        {
            tClonedAnimations.add( tAnimation.clone() );
        }
        
        return tClonedAnimations;
    }

    /**
     * @return the onCreate
     */
    public List<BasicAnimation> getOnCreate()
    {
        return onCreate;
    }

    /**
     * @return the onUpdate
     */
    public List<BasicAnimation> getOnUpdate()
    {
        return onUpdate;
    }

    /**
     * @return the onDelete
     */
    public List<BasicAnimation> getOnDelete()
    {
        return onDelete;
    }

    /**
     * @return the onFocus
     */
    public List<BasicAnimation> getOnFocus()
    {
        return onFocus;
    }

    /**
     * @return the onClick
     */
    public List<BasicAnimation> getOnClick()
    {
        return onClick;
    }

    /**
     * @param onCreate
     *            the onCreate to set
     */
    public void setOnCreate( List<BasicAnimation> onCreate )
    {
        this.onCreate = onCreate;
    }

    /**
     * @param onUpdate
     *            the onUpdate to set
     */
    public void setOnUpdate( List<BasicAnimation> onUpdate )
    {
        this.onUpdate = onUpdate;
    }

    /**
     * @param onDelete
     *            the onDelete to set
     */
    public void setOnDelete( List<BasicAnimation> onDelete )
    {
        this.onDelete = onDelete;
    }

    /**
     * @param onFocus
     *            the onFocus to set
     */
    public void setOnFocus( List<BasicAnimation> onFocus )
    {
        this.onFocus = onFocus;
    }

    /**
     * @param onClick
     *            the onClick to set
     */
    public void setOnClick( List<BasicAnimation> onClick )
    {
        this.onClick = onClick;
    }
}
